<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商品展示</title>
    <style>
        #container {
            /*设置弹性布局*/
            display: flex;
        }

        .card {
            border: 1px solid red;
            width: 100px;
            height: 200px;
            margin-right: 10px;
        }

        .img_block {
            height: 110px;
        }

        .price_block {
            color: red;
        }
    </style>
</head>
<body>
<div id="app">
    <div id="container">
        <div class="card" v-for="(item) in goodsList">
            <div class="img_block">
                <img :src="item.imgUrl" alt="暂无图片">
            </div>
            <div class="des_block">
                <span>{{item.description}}</span>
            </div>
            <div class="price_block">
                ￥<span>{{item.price}}</span>
                销量:{{item.salesCount}}
            </div>
        </div>
    </div>
</div>
</body>
<script src="js/vue.js"></script>
<script>
    new Vue({
        el: '#app',
        data: {
            goodsList: [{
                imgUrl: 'resource/goods01.png',
                description: 'JANUS儿童羊毛内衣 秋冬保暖秋',
                price: 359.0,
                salesCount: '1000+'
            },
                {
                    imgUrl: 'resource/goods02.png',
                    description: '心相印抽纸茶语纸巾面巾纸卫生纸',
                    price: 3.80,
                    salesCount: '100万+'
                },
                {
                    imgUrl: 'resource/goods03.png',
                    description: '立白天然亮白洗衣液护色护衣薰衣',
                    price: 11.90,
                    salesCount: '7万+'
                }
            ]
        }
    })
</script>
</html>